const JWT = require('jsonwebtoken');

const SECRET = '8677df7fc3a34e26a61c034d5ec8245d';
// const JAVA_JWT = 'eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIxIiwic3ViIjoi5bCP5piOIiwiaXNzIjoi55Ge6ZuqIiwiaWF0IjoxNTQwNDQ4ODc1LCJleHAiOjE1NDA0NDg5MDV9.1Gr09RSNYo-3cHfblqd4eU4iBamnYKc2EMMK5NAERJYUocikeHIIsuPY6exkh5ABtTcbqAFlhK-IWx6CqhFXbA';

let token = JWT.sign({opCode: '888'}, SECRET, { expiresIn: 36000, algorithm: 'HS512' });
// console.log(JWT.verify(token, new Buffer(SECRET, 'base64'), { algorithms: ['HS512'] }))
console.log(JWT.verify(token, SECRET, { algorithms: ['HS512'] }))
process.exit(0)
